package com.spring.shops.dao;

import com.spring.shops.model.dto.HotSearchDTO;
import com.spring.shops.model.entity.TzHotSearch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TzHotSearchMapper {
    int deleteByPrimaryKeys(List<Integer> hotSearchId);

    int insert(TzHotSearch record);

    int insertSelective(TzHotSearch record);

    TzHotSearch selectByPrimaryKey(Long hotSearchId);

    int updateByPrimaryKeySelective(TzHotSearch record);

    int updateByPrimaryKey(TzHotSearch record);

    @Select("select * from tz_hot_search where hot_search_id=#{id}")
    TzHotSearch selectById(long id);
    @Select("select count(*) from tz_hot_search")
    long selectCountHotSearch();

    @Select("select * from tz_hot_search  order by hot_search_id desc limit #{param1},#{param2}")
    TzHotSearch[] selectByPage(int start, int size);
    TzHotSearch[] selectByPageSearch(HotSearchDTO hotSearchDTO);
}